package org.bbelovic.devel.exercises.sequences.impl;

import java.util.ArrayList;
import java.util.List;

import org.bbelovic.devel.exercises.NumberUtilities;
import org.bbelovic.devel.exercises.sequences.SequenceGenerator;

public class NumberOfDivisorsSequenceGenerator implements SequenceGenerator {

    public List<Integer> generateSequence(final int n) {
        final List<Integer> result = new ArrayList<Integer>();
        int act = 1;
        for (int i = 0; i < n; i++) {
            result.add(act);
            act += NumberUtilities.numberOfDivisors(act);
        }
        return result;
    }

}
